import request from '@/utils/request.js' // 导入  定义所有频道接口
// 获取用户已选频道
const getAllChannelListAPI = function () {
  // 必须加return!!
  return request({
    url: '/v1_0/user/channels'
  })
}
// 获取所有频道
const getAllChannels = () => {
  return request({
    url: '/v1_0/channels'
  })
}

// 增加用户所选频道
const increasingChannel = (channels) => {
  return request({
    method: 'PUT',
    url: '/v1_0/user/channels',
    data: {
      channels
    }
  })
}

export {
  getAllChannelListAPI,
  getAllChannels,
  increasingChannel
}
